package com.goods.dao.detaildao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.goods.pojo.Detail;

public interface DetailMapper {
	/**
	 * 根据商品类型获取商品信息
	 * 
	 * @param sortId
	 * @return
	 */
	public List<Detail> getAllDetail(Detail detail) throws Exception;

	/**
	 * 根据商品类型获取商品数量
	 * 
	 * @param sortId
	 * @return
	 */
	public int getAllDetailCount(Detail detail) throws Exception;

	/**
	 * 根据id获取商品信息
	 */
	public Detail getGoodById(@Param("id") int id) throws Exception;

	/**
	 * 购买商品
	 */
	public int updateNumByIdNum(@Param("remaining") int num, @Param("id") int id)throws Exception;
}
